class Solution:
    def exchange(self, nums: List[int]) -> List[int]:
        h, t = [], []
        for i in nums:
            if i%2:
                h.append(i)
            else:
                t.append(i)
        return h+t